#define CRT_SECURE_NO_WARNINGS
#include"BinarySearchTree.h"
using namespace std;

std::vector<int> a;
int n, x;
int main() {
	clock_t startTime, endTime;
	freopen("data.in", "r", stdin);
	std::cin >> n;
	for (int i = 1; i <= n; i++) {
		std::cin >> x;
		//std::cout << x << " ";
		a.push_back(x);
	}
	cout<<n<<endl;
	std::cout<<"_mode = 0"<<std::endl;
	startTime = clock();
	BSTsorting(a, 0);
	endTime = clock();
	std::cout<<"The run time is: "<<(double)(endTime - startTime) << "ms" << std::endl;
	
	std::cout<<"_mode = 1"<<std::endl;
	startTime = clock();//��ʱ��ʼ
	BSTsorting(a, 1);
	endTime = clock();//��ʱ����
	std::cout << "The run time is: " << (double)(endTime - startTime) << "ms" << std::endl;
	
	return 0;
}
